package com.example.biyesheji.controller;

import com.example.biyesheji.model.result.MenuTableResult;
import com.example.biyesheji.service.MenuTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 菜单表控制器
 *
 * @author xwh
 * @date 2023/02/11
 */
@RestController
@RequestMapping("/product")
public class MenuTableController {

    @Autowired
    private MenuTableService menuTableService;
    @CrossOrigin
    @GetMapping("/menuTable")
    public List<MenuTableResult> getMenuTable(){
        List<MenuTableResult> menuTableResult = menuTableService.getMenuTableResult();
        return menuTableResult;
    }

}
